/**
 * 
 */
package com.changil.nowonchangilchurch.protocol.http.request;

import com.changil.nowonchangilchurch.protocol.http.RestClient;
import com.loopj.android.http.JsonHttpResponseHandler;



/**
 * @author zeropol2
 *
 */
public class ArticleListRequest extends BaseHttpRequset {
	private int mBoardId;
	private int mFromId;
	private int mCount;
	private boolean mIsDownSide;
	public ArticleListRequest(int boardId, int fromId, int count, boolean isDownSide) {
		mBoardId = boardId;
		mFromId = fromId;
		mCount = count;
		mIsDownSide = isDownSide;
	}

	@Override
	protected void setParams() {
		mPath = "/articles?"
				+ "boardId="+mBoardId + "&"
				+ "fromId="+mFromId + "&"
				+ "count="+mCount +"&"
				+ "isDownSide="+mIsDownSide;
	}
	
	@Override
	public void request(JsonHttpResponseHandler handler) {
		setParams();
		RestClient.get(mPath, handler);
	}
}
